﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace FlyBird
{
    class Cloud
    {
        //云彩图片
        private Image img;
        //云彩速度
        private int speed;
        //云彩位置
        private int x, y;


        public Cloud() { }

        public Cloud(Image img, int speed, int x, int y)
        {
            this.img = img;
            this.speed = speed;
            this.x = x;
            this.y = y;
        }

        public void draw(Graphics g)
        {
            x -= speed;
            g.DrawImage(img, x, y);
        }
        //云彩是否飞出屏幕
        public bool isOutFrame()
        { 
            if(x < -100)
            {
                return true;
            }
            return false;
        }
    }
}
